-- |
-- Module:        Hexena
-- Stability:     Experimental
-- Portability:   Portable
--
-- Haskell EXEcutable aNAlyser MAIN
--
-- A better main module description is forthcoming.
module Main(main) where

import System.Console.CmdArgs
import System.Environment (getArgs, withArgs)

import Hexena.OptParse (optionHandler, rootMode)

main :: IO ()
main = do
    args <- getArgs
    -- If the user did not specify any arguments, pretend as "--help" was given
    opts <- (if null args then withArgs ["--help"] else id) $ cmdArgsRun rootMode
    optionHandler opts

